package com.quasar.hpatient.constant;

import android.os.Environment;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * author : 许建宏
 * Date: 2017/9/26 0026
 * View:码表数据
 */

public interface ConstantManger {

    //短信KEY
    String SMSKEY = "4902c6b5272c679af0090d63887004b2";
    //短信模板
    String SMS = "YZ_patient";
    //基础数据库文件路径
    String DARABASEDBPATH = Environment.getExternalStorageDirectory() + "/Android/data/com.quasar.hpatient/files/databases/";
    //数据库名称
    String DATABDNAME = "HPatient.db";
    //患者
    String userType = "0";
    //医生
    String EditType = "1";
    //重新获取个人信息
    String eventUserInfo = "1";
    //关闭浏览图片界面
    String ClosePhoto = "3";
    //刷新主界面服药界面
    String MEDICINE = "4";
    //我的药单刷新
    String MYGUESS = "5";
    //刷新推送过来的主界面消息
    String JPSHMAG = "6";
    //更新社区接口
    String UPDATEPOST = "7";
    //咨询轮播最多显示的个数
    String PAGESIZECONSULTATION = "5";
    //添加病例后刷新病历信息
    String CASELIST = "8";
    //刷新其他日常列表
    String OTHERDAILY = "9";
    //刷新我的医生列表
    String MYDOCTORX = "10";

    //删除图片后更新图片
    String deletePhoto = "11";

    //刷新计步数据
    int motion=15;


    //0：患者被关注
    int RELATION0 = 0;
    //1：待审核关系
    int Relation1 = 1;
    //2：已经形成医患关系
    int Relation2 = 2;
    //3：已解除关系
    int Relation3 = 3;
    //4：医生特别关注患者
    int Relation4 = 4;
    //10：患者好友关系
    int Relation10 = 10;
    //20：医生好友关系
    int Relation20 = 20;
    //30停止随访
    int stopRelation = 30;

    //医生拒绝
    int Relation22 = 22;

    //添加好友状态
    String addto = "0";
    //异常值
    int OutliersVal = 1;
    //正常值
    int NormalVal = 0;

    int DIAGNOSISVALUE = 29;

    /**
     * 时间段选择
     */
    //一周
    int Aweek = -7;
    //两周
    int Twoweeks = -14;
    //一月
    int January = -30;
    //三月
    int March = -90;
    //半年
    int Halfayear = -180;

    String PagerSize = "10";


    String LIFE_DIA = "1"; //诊断信息
    String LIFE_EVENT = "2"; //事件信息
    String LIFE_PHAR = "3"; //调药记录
    String LIFE_CASE = "4";//生命史病历

    /**
     * 日常检查项
     */

    //体温
    String TEMPERATURENAME = "体温";
    String TEMPERATURREFERENCE = "36.0-41.0";
    String COMPANYNAME = "摄氏度(℃)";
    String LOWHEAT = "37.3-38";//低烧
    String HIGHFERVER = "38.1-42";//高烧

    //血压
    String BLOODPRESSURENAME = "血压";
    String BLOODPRESSURECOMPANYNAME = "毫米汞柱(mmHg)";
    String BLOODPRESSUREFERENCEHIGH = "40.0-300.0";
    String BLOODPRESSUREFERENCEMIN = "30.0-180";
    String BLOODITEMLIST = "血压";


    //心率
    String HEARTRATENAME = "心率";
    String HEARTRATENAMEFERENCE = "40.0-200.0";
    String HEARTRATENAMECOMPANYNAME = "次/分";
    String LOWHEARTRATENAME = "40.0-60";//
    String HIGHHEARTRATENAME = "100-200";
    //血糖
    String BILLDSUGAR = "血糖";
    String BILLDSUGARFERENCE = "0.0-40.0";
    String BILLDSUGARDOSE = "毫摩尔/升(mmol/L)";
    String BILLDSUHIGR = "11-25";//高血糖
    String CRISISBILLDHIGR = "25-40";//危急值高
    String CRISISBILLDLOW = "2.8-11";//危急值低

    //出入量
    String INOUTPUTVAL = "出入量";
    String INOUTPUTVALUNIT = "毫升(ml)";
    String INOUTVALUES = "0-100000";

    //bmi
    String BMI = "BMI";

    String OUTSUM = "总出量";
    String INSUM = "总入量";
    String night = "夜尿量";

    String height = "身高";
    String weight = "体重";
    String flowrate="引流量";


    //定义化验项目显示或隐藏还是自定义项目
    int DISPLAYVIEW = 1;//显示
    int HIDEVIEW = 0;//隐藏
    int CUSTOMVIEW = -1;//自定义


    //异常值
    //体温
    String temperature1 = "36-37.3";


    //服药的状态
    int MEDICINEBORMAL = 1;//服药正常
    int MEDICINEDIDNOTSUIT = 0;//未服药
    int MEDICINETIMEOUT = 2;//超时服药
    int CANCEL = 3;//超时服药

    //计算服药天数
    //一天
    int oneDay = 1;
    //两天
    int anotherday = 2;
    //三天
    int Threedays = 3;
    //五天
    int Fivedays = 5;
    //一周
    int endAweek = 7;
    //一月
    int endJanuary = 30;

    //长期
    int longTime = 10000;


    //患者 信息单个提交
    String USERNAME = "realname";//姓名
    String USERSEX = "sex";//性别
    String USERBIRTHDAY = "birthday";//生日
    String USERADDRESS = "address";//住址
    String USERBLOODID = "bloodid";//血型
    String USERSOURCEID = "sourceid";//器官来源
    String USERHOSPITAL = "hospitalid";//手术医院
    String USEROPERATIONDATE = "operationtime";//手术时间
    //个人信息表名称
    String TABLEUSERINFO = "patient_info";
    //器官来源表
    String TABLEOPERATION = "patient_operation_info";

    //推送标识
    String PUSHTESTING = "8";
    String PUSHPHARMACY = "9";
    String PUSHDOUBLEPHARMACY = "10";

    String UPDATEDAILY = "1";
    String DELETEDAILY = "0";
    int TESTVAL=0;//化验单


    public static Map<String, String> map = new HashMap<String, String>() {
        {
            //公共 代码
            put("0x00000000", "成功");
            put("0xFFFFFFF1", "用户码验证失败");
            put("0xFFFFFFF2", "网络连接失败");
            put("0xFFFFFFF3", "失败公共代码");

            //基础配置message
            put("0x00000F01", "获取地理位置信息");
            put("0x00000F02", "获取版本信息");
            put("0x00000F03", "获取日志类型信息");
            put("0x00000F04", "获取第三方数据类型信息");
            put("0x00000F05", "获取数据库表的最新版本信息");
            put("0x00000F06", "获取医院数据信息");
            put("0x00000F07", "获取医院医生职位信息");
            put("0x00000F08", "获取医院药品类型信息");
            put("0x00000F09", "获取医院药品信息");
            put("0x00000F0A", "获取医院药品剂量名称信息");
            put("0x00000F0B", "获取医院检查项目量纲名称信息");
            put("0x00000F0C", "获取医院检查单检查项目信息");
            put("0x00000F0D", "获取医院日常检查项目信息");
            put("0x00000F0E", "获取医院检查单检查项目信息");
            put("0x00000F0F", "获取医院检查单信息");
            put("0x00000F10", "获取医院检查单检查项目信息");
            put("0x00000F11", "获取医院常见疾病信息");
            put("0x00000F12", "获取医院常见疾病信息");
            put("0x00000F13", "获取医院血型信息");
            put("0x00000F14", "获取身体部位信息");
            put("0x00000F15", "获取医院科室信息");
            put("0x00000F16", "获取不适症状项目信息");
            put("0x00000F17", "获取不适时长类型信息");
            put("0x00000F18", "获取服药周期信息");
            put("0x00000F19", "获取医院服药方式信息");
            put("0x00000F1A", "获取肾来源信息");
            put("0x00000F1B", "获取消息分类信息");
            put("0x00000F1C", "获取随访终止分类信息");
            put("0x00000F1D", "获取诊断信息分类");
            put("0x00000F1E", "");
            put("0x00000F1F", "");
            put("0x00000F20", "");
            put("0x00000F21", "");
            put("0x00000F22", "");
            put("0x88888888", "身份证号码已存在");

            // 圈子配置 message
            put("0x00000000", "成功");
            put("0x00000201", "用户帖子列表获取失败");
            put("0x00000202", "用户帖子详情获取失败");
            put("0x00000203", "用户发帖失败");
            put("0x00000204", "用户删帖失败");
            put("0x00000205", "帖子点赞失败");
            put("0x00000206", "帖子评论失败");
            put("0x00000207", "获取资讯列表失败");
            put("0x00000208", "获取资讯详情失败");
            put("0x00000209", "资讯收藏失败");
            put("0x0000020A", "意见反馈失败");
            put("0x0000020B", "修改密码失败");
            put("0x0000020C", "修改电话失败");
            put("0x0000020D", "添加团队失败");
            put("0x0000020E", "添加团队成员失败");
            put("0x0000020F", "备注好友失败");
            put("0x00000210", "修改个人信息失败");
            put("0x00000211", "修改基本资料信息失败");
            put("0x00000212", "修改出诊信息失败");
            put("0x00000213", "获取动态信息失败");
            put("0x00000214", "添加动态信息失败");
            put("0x00000215", "关注失败");
            put("0x00000216", "取消关注失败");
            put("0x00000217", "同意成为患者医生失败");
            put("0x00000218", "删除患者失败");
            put("0x00000219", "分配患者失败");
            put("0x0000021A", "取消分配患者失败");
            put("0x0000021B", "共享患者失败");
            put("0x0000021C", "取消共享患者失败");
            put("0x0000021D", "终止随访失败");
            put("0x0000021E", "特殊标记失败");
            put("0x0000021F", "取消特殊标记失败");
            put("0x00000220", "转存患者检查单失败");
            put("0x00000221", "");
            put("0x00000222", "");

            /*登陆信息码*/
            put("0x00000001", "用户注册失败，用户名已经存在");
            put("0x00000002", "用户注册失败，验证码错误");
            put("0x00000010", "用户登录成功，正常用户");
            put("0x00000011", "用户名不存在");
            put("0x00000012", "用户密码错误");
            put("0x00000013", "用户验证码错误");
            put("0x00000014", "用户已经失效（被删除）");
            put("0x00000015", "用户登录成功，处于待审核状态");
            put("0x00000016", "用户审核失败，用户资料不真实");
            put("0x00000017", "用户资料不全，需要补充");
            put("0x00000018", "用户帐号被冻结");
            put("0x00000020", "用户密码重置成功");
            put("0x00000021", "用户手机号码不存在");
            put("0x00000022", "密码重置过于频繁");
            put("0x00000031", "用户码不存在，可能是攻击数据");

            /*患者操作*/
            put("0x00000301", "日常记录项添加失败");
            put("0x00000302", "日常记录项删除失败");
            put("0x00000303", "日常数据提交失败");
            put("0x00000304", "添加用药数据失败");
            put("0x00000305", "修改用药数据失败");
            put("0x00000306", "删除用药数据失败");
            put("0x00000307", "单个服药信息提交失败");
            put("0x00000308", "多个服药信息提交失败");
            put("0x00000309", "一键服药信息提交失败");
            put("0x0000030A", "不适症状提交失败");
            put("0x0000030B", "提交医院信息失败");
            put("0x0000030C", "检查单数据添加失败");
            put("0x0000030D", "检查单数据修改失败");
            put("0x0000030E", "检查单数据删除失败");
            put("0x0000030F", "添加第三方的记录数据失败");
            put("0x00000310", "医生ID列表");
            put("0x00000311", "医生缩略信息获取");
            put("0x00000312", "获取热门医生列表");
            put("0x00000313", "搜索医生列表失败");
            put("0x00000314", "获取医生的详情");
            put("0x00000315", "获取医生的历史动态信息");
            put("0x00000316", "申请成为医生的病人");
            put("0x00000317", "取消申请成为医生的病人");
            put("0x00000004", "用户已存在");
        }
    };


    Map<String, String> mapJpsh = new HashMap<String, String>() {
        {
            put("0", "测试消息");
            put("1", "您有一个好友请求");
            put("2", "添加医生成功");
            put("3", "您的请求被拒绝");
            put("4", "");
            put("5", "");
            put("6", "您被关注");
            put("7", "您有新的检查单");
            put("8", "您的检查单已被诊断");
            put("9", "您有新的药单");
            put("10", "您的药单被修改");
            put("11", "病人修改了药单");
            put("12", "病人提交了不适症状");
            put("13", "您已进入团队");
            put("14", "给您分配了病人");
            put("15", "病人提交了事件");
            put("16", "医生提交了事件");
            put("17", "病人的化验单出现危急值");
        }
    };


    //保存图片路径
    String IMAGEURLS = Environment.getExternalStorageDirectory() + "/Yizhi/image/";

    //图片名称

    String IMAGENAME = "yizhi_" + new SimpleDateFormat("yyyyMMddHHmmss")
            .format(new Date()) + ".jpg";// 照片命名
}
